// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 此处后端没有提供注释 POST /product/delete/${param0} */
export async function deleteProducts(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteProductsParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(`/product/delete/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /product/edit */
export async function updateProducts(
  body: API.ProductsUpdateDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/product/edit", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /product/get/${param0} */
export async function getProductsVo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getProductsVOParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseProductsVO>(`/product/get/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /product/list/page/vo */
export async function listProductsVoByPage(
  body: API.ProductQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageProductsVO>("/product/list/page/vo", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
